<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
	<meta charset="UTF-8">
	<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

	<style>
		.login {
			color: white;
			height: 38px;
			width: 100px;
			background-color: #2b669a;
		}
	</style>
	<title>网上招聘系统</title>
</head>
<body>
	<% 
		Cookie[] cookies = request.getCookies();
		String username = ""; 
		String password = ""; 
		if(cookies!=null){
			for(Cookie c:cookies){
				if("username".equals(c.getName())){
					username = c.getValue();
				}
				if("password".equals(c.getName())){
					password = c.getValue();
				}
			}
		}
	%>

	<div class="container">
		<h2 class="text-center" style="margin-top: 200px">招聘管理系统</h2>
		<div class="row">
			<form class="form-horizontal col-md-offset-4 col-md-4" style="font-size: 16px" method="post" action="/loginConfirm">
				<div class="form-group" style="margin-top: 20px">
					<label class="col-sm-3 control-label">用户名</label>
					<div class="col-sm-9">
						<input class="form-control" placeholder="请输入用户名" type="text" name="username" value="<%=username %>"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">密&nbsp;&nbsp;&nbsp;码</label>
					<div class="col-sm-9">
					<input class="form-control" placeholder="请输入密码" type="password" name="password" value="<%=password %>"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">类&nbsp;&nbsp;&nbsp;型</label>
					<div class="col-sm-9" style="margin-top: 5px">
						<input class="radio-inline" type="radio" value="个人" name="type" checked/>
						<label>个人</label>
						<input class="radio-inline" type="radio" value="公司" name="type"/>
						<label>公司</label>
					</div>
				</div>

				<div class="form-group">
					<div class="col-sm-offset-3 col-sm-9">
						<div class="checkbox">
							<label>
								<input type="checkbox" name="rem">记住密码
							</label>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-3 col-sm-3">
						<button type="submit" class="btn btn-default login ">登录</button>
					</div>
					<div class="col-sm-offset-1 col-sm-3">
						<a href="/registerPerson.jsp" class="btn btn-default login ">注册</a>
					</div>
				</div>

            </form>
		</div>
	</div>
</body>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/common.js"></script>

</html>